package be.one.paq.ui.page.admin.user;

import org.vaadin.navigator7.Page;

import be.one.paq.ui.component.user.UserTable;

import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Label;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;

@Page(uriName="user")
@SuppressWarnings("serial")
public class UserPage extends CustomComponent {
	
	public UserPage() {
		VerticalLayout mainLayout = new VerticalLayout();
        mainLayout.setSpacing(true);
        mainLayout.setSizeFull();
        setCompositionRoot(mainLayout);

        mainLayout.addComponent( new Label("Note the uri: '#user' instead of 'UserPage' (page class name)." +
        		" This is due to the @Page(uriName=\"dash\") annotation on the User class." ));
        
        Table userTable = new UserTable();
        userTable.addStyleName("big");
        mainLayout.addComponent(userTable);
	}

}
